This page last changed on Mar 07, 2007 by cholmes.
(from Simone on the mailing list - we obviously need to clean this up, but it's a start of some useful information)
There is a lot of confusion around about what world file is.
A couple of (hopefully) clarifications.
World File is a de-facto standard from early days of ESRI desktop GIS
applications.
Originally it was composed by at least two files, a tif (be aware that most
esri software DO not recognize the extension tiff which is pretty funny
IMHO) and a tfw file that contains
some strange numbers which I will explain later on but that basically define
the transformation between the image and the target spatial reference
system.
This .tfw file is what should be properly called the world file. Other
extensions that could be used on behalf of tfw are wld tifw, etc...
Moreover some other formats beside tif can be used, like gif, png, jpeg,
jpeg2k, etc..and the extensions for the world file become pretty fancy
(gifw, pgw, etc..)
The concept behind this strange couple is as follows.
An image (e.g. a tif) plus its world file represent a geospatial
georectified raster in some spatial coordinate reference system. he mapping
between the raster space
(the intrinic image crs of rows and cols) and the associated spatial space
is represented by an affine transform whose coeffficients are contained
inside
the accompaining world file (see below). This way, practically any image
format can be made spatial-aware just adding a world file containig an
affine transform that maps image points onto a
crs.
Here is a good explanation of what a world file contains
http://en.wikipedia.org/wiki/World_file
One would now ask, ok, but what CRS I am supposed to use. The best answer is
the one the guy whi produce the image + the world file was using
Without kidding many people make assumptions on the CRS use as the end-point
for the georeferencing affine transform contined in the world file, but in
fact
all of them can be in principle wrong, because the CRS can be pretty messed
up with respect to axes order and axes flipping, ask Martin Desruisseaux,
the referencing guru).
The most used way to transmit the information about the spatial coordinate
reference system is providing a third file with extension .prj
which contains the WKT description of the user spatial CRS.
Hence in general:
Image (e.g.SimoneRocks.tif file) World File (e.g. SimoneRocks.tfw)
RASTER SPACE GEOREFERENCING
MODEL (spatial) SPACE
grid-to-world
mapping
-------------------->
^
|
|
|
|
m00 m01 m02 |
|
|
m10 m11 m12 |
|
|
0 0
1 |
= |
|
|
|
|
|
|
|
|
|
|
--------------------> |
NOTE that usually the raster space has x going right and y going down while
in model space things DEPEND on the spatial CRS!!!!
Here I drew the most common case which is the lon(west)-lat(north)
orientation but things can get pretty messy.
CONCLUSION
ALWAYS ASK YOUR DATA PROVIDER TO DESCRIBE EXACTLY THE SPATIAL COORDINATE
REFERENCE SYSTEM THAT WAS USED
TO GEOREFERENCE YOUR DATA
Btw, I don't pretend to have written any standard, article, todo, or the
like. I jut dropped down some thoughts, hence feel free to add, correct,
rectify (always
specifying the targert spatial CRS thought!) this document.
|